/* 
KANE & NEWMAN 
"WHAT THEY HAVE BUT ALSO WHO THEY ARE: 
AVARICE, ELITISM, AND PUBLIC SUPPORT FOR TAXING THE RICH"
PUBLIC OPINION QUARTERLY
REPLICATION CODE
*/

graph set window fontface "ArialMT" // change font
ssc install blindschemes //  add schemes
set scheme plottig // add schemes
ssc install fre // install fre package


*MODEL OUTPUT (see APPENDIX C) AND FIGURE 1

*MTurk Results
use "Kane_Newman_MTurk_replicationdata.dta"
reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2, /// Elitism
cluster(respondent)

estimate store baseline_M
tab selected if e(sample) // Overall % choosing to raise tax on wealthy target

*Qualtrics Results
use "Kane_Newman_Qualtrics_replicationdata.dta"
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2, /// Elitism
cluster(responseid)

estimate store baseline_Q
tab selected if e(sample) // Overall % choosing to raise tax on wealthy target

*Figure 1 
*(Note: some edits were manually done to graph for aesthetic purposes; text was manually added)

coefplot baseline_M, bylabel("{bf: MTurk}") || baseline_Q, bylabel("{bf:Qualtrics}") ///
byopts(row(1)) mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.1(.1).2) drop(_cons) omitted base xline(0) ///
headings(1.income_num2 = "{bf:Income}" 1.occupation_num2 = "{bf:Occupation}" ///
1.source_num2 = "{bf:Nature of Wealth}" 1.family_num2 = " "  1.real_num2 = "{bf:Excessive Consumption}" ///
1.cars_num2 = " " 1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " ///
1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
ylabel(, labsize(vsmall)) ///
msize(vsmall) ///
xtitle("{bf:Change in Pr(Raise Tax on People Like Target)}", size(vsmall)) ///
ytitle("") xsize(6.5) ysize(9) scale(.6) ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) 


*************************************
*APPENDIX A:  DEMOGRAPHIC INFORMATION
*************************************
	*Table A1:  MTurk Data
use "Kane_Newman_MTurk_replicationdata.dta"
collapse female race5cat pid7_clean ideology_clean income age region, by(responseid)
tabstat age income, st(mean p50 sd)
tab1 race5cat pid7_clean ideology_clean


	*Table A1:  Qualtrics Data
use "Kane_Newman_Qualtrics_replicationdata.dta"
*Collapse data to calculate percentages
collapse female race5cat pid7_clean ideology_clean income age region, by(responseid)
tab1 female race5cat pid7_clean ideology_clean region
tabstat income age, st(mean p50 sd)


***********************************
*APPENDIX D:  SUBGROUP ANALYSES
***********************************
***********
**By Party
***********

	*MTurk Code
use "Kane_Newman_MTurk_replicationdata.dta"

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if D0R1==0, /// Elitism
cluster(respondent)

estimate store Democrats

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if D0R1==1, /// Elitism
cluster(respondent)

estimate store Republicans


*Figure D1:  Top Panel
coefplot Democrats, bylabel("{bf: Democrats}") || Republicans, bylabel("{bf: Republicans}") ///
byopts(row(1) title("{bf:MTurk Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
xlab(-.1(.1).3) ///
ylabel(, labsize(small)) xtitle("") ytitle("")  ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(mturk_party, replace)


	*Qualtrics Code
use "Kane_Newman_Qualtrics_replicationdata.dta"
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if D0R1==0, /// Elitism
cluster(responseid)

estimate store Democrats

reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if D0R1==1, /// Elitism
cluster(responseid)

estimate store Republicans

	*Figure D1:  Bottom Panel
coefplot Democrats, bylabel("") || Republicans, bylabel("") ///
byopts(row(1) title("{bf:Qualtrics Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
ylabel(, labsize(small)) ///
xtitle("                                                    {bf: Change in Pr(Raise Tax on People Like Target})", size(vsmall)) ///
ytitle("")  ///
xlab(-.1(.1).3) ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(qualtrics_party, replace)

*Figure D1 Combined
graph combine "mturk_party.gph" "qualtrics_party.gph", scheme(plottig) col(1) ///
xsize(6) ysize(8) ///
graphregion(margin(vsmall)) 


*************
**By Ideology
*************

	*MTurk Code
use "Kane_Newman_MTurk_replicationdata.dta"
reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if Lib0Con1==0, /// Elitism
cluster(respondent)

estimate store Liberals

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if Lib0Con1==1, /// Elitism
cluster(respondent)

estimate store Conservatives


	*Figure D2:  Top Panel
coefplot Liberals, bylabel("{bf: Liberals}") || Conservatives, bylabel("{bf: Conservatives}") ///
byopts(row(1) title("{bf:MTurk Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
xlab(-.1(.1).3) ///
ylabel(, labsize(small)) xtitle("") ytitle("")  ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(mturk_libcon, replace)


	*Qualtrics Code
use "Kane_Newman_Qualtrics_replicationdata.dta"
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if Lib0Con1==0, /// Elitism
cluster(responseid)

estimate store Liberals

reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if Lib0Con1==1, /// Elitism
cluster(responseid)

estimate store Conservatives

	*Figure D2: Bottom Panel
coefplot Liberals, bylabel("") || Conservatives, bylabel("") ///
byopts(row(1) title("{bf:Qualtrics Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
ylabel(, labsize(small)) ///
xtitle("                                                    {bf: Change in Pr(Raise Tax on People Like Target})", size(vsmall)) ///
ytitle("")  ///
xlab(-.1(.1).3) ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(qualtrics_libcon, replace)

*Figure D2 Combined
graph combine "mturk_libcon.gph" "qualtrics_libcon.gph", scheme(plottig) col(1) ///
xsize(6) ysize(8) ///
graphregion(margin(vsmall)) 


********************************************
**BY Prospect of Upward Mobility (POUM)
********************************************

	*MTurk Code
use "Kane_Newman_MTurk_replicationdata.dta"
reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if POUM<=3, /// Elitism
cluster(respondent)

estimate store lowPOUM

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if POUM>=4, /// Elitism
cluster(respondent)

estimate store highPOUM


*Figure D3:  Top Panel
coefplot lowPOUM, bylabel("{bf: Low POUM}") || highPOUM, bylabel("{bf: High POUM}") ///
byopts(row(1) title("{bf:MTurk Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
xlab(-.1(.1).3) ///
ylabel(, labsize(small)) xtitle("") ytitle("")  ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(mturk_poum, replace)


	**QUALTRICS CODE 
use "Kane_Newman_Qualtrics_replicationdata.dta"
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if poum<=3, /// Elitism
cluster(responseid)

estimate store lowPOUM

reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if poum>=4, /// Elitism
cluster(responseid)

estimate store highPOUM

	*Figure D3:  Bottom Panel
coefplot Liberals, bylabel("") || Conservatives, bylabel("") ///
byopts(row(1) title("{bf:Qualtrics Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
ylabel(, labsize(small)) ///
xtitle("                                                    {bf: Change in Pr(Raise Tax on People Like Target})", size(vsmall)) ///
ytitle("")  ///
xlab(-.1(.1).3) ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(qualtrics_poum, replace)

*Figure D3 Combined
graph combine "mturk_poum.gph" "qualtrics_poum.gph", scheme(plottig) col(1) ///
xsize(6) ysize(8) ///
graphregion(margin(vsmall)) 


********************************************
**BY Income
********************************************

	*MTurk Code
use "Kane_Newman_MTurk_replicationdata.dta"
reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if income<=3, /// Elitism
cluster(respondent)

estimate store lowInc

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if income>=9, /// Elitism
cluster(respondent)

estimate store highInc


*Figure D4: Top Panel
coefplot lowInc, bylabel("{bf: Low Income}") || highInc, bylabel("{bf: High Income}") ///
byopts(row(1) title("{bf:MTurk Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
xlab(-.1(.1).3) ///
ylabel(, labsize(small)) xtitle("") ytitle("")  ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(mturk_inc, replace)


	**QUALTRICS CODE 
use "Kane_Newman_Qualtrics_replicationdata.dta"
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if income<=2, /// Elitism
cluster(responseid)

estimate store lowInc

reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2 if income>=5, /// Elitism
cluster(responseid)

estimate store highInc

	*Figure D4: Bottom Panel
coefplot Liberals, bylabel("") || Conservatives, bylabel("") ///
byopts(row(1) title("{bf:Qualtrics Sample}", orientation(vertical) pos(9))) ///
mcolor(black) ciopts(lcolor(black) lwidth(thin) recast(rcap)) xlabel(-.5(.25).5) drop(_cons) omitted base xline(0)  ///
keep(*.tax2 *.donate_num2  *.goals_num2 *.travel_num2 *.affiliations_num2 *.network_num2 *.report_num2) ///
headings(1.tax2 = "{bf:Avarice}" 1.donate_num2 = " " 1.goals_num2 = " " 1.travel_num2 = "{bf:Elitism}" 1.affiliations_num2 = " " ///
1.network_num2 = " " 1.report_num2 = " " , labsize(small))  ///
ylabel(, labsize(small)) ///
xtitle("                                                    {bf: Change in Pr(Raise Tax on People Like Target})", size(vsmall)) ///
ytitle("")  ///
xlab(-.1(.1).3) ///
plotregion(fcolor(gs15)) graphregion(margin(small)) levels(95) saving(qualtrics_inc, replace)

*Figure D4 Combined
graph combine "mturk_inc.gph" "qualtrics_inc.gph", scheme(plottig) col(1) ///
xsize(6) ysize(8) ///
graphregion(margin(vsmall)) 


*************************************
*APPENDIX E:  ATTENTIVENESS ANALYSES
*************************************

/*Proportion answering each factual manipulation check correctly
(testing whether each proportion significantly differs from chance
based upon the number of response options offered for each item).
*/

	*MTurk Analyses
use "MTurk_Analyses_AppendixE.dta"
prtest race_correct==.25  // .98 (p<.001)

prtest gender_correct==.5  // .98 (p<.001)

prtest age_correct ==.20  // .80 (p<.001)

prtest edu_correct == .25  // .73 (p<.001)

prtest relig_correct ==.25  // .97 (p<.001)

prtest pid_correct ==.3333  // .76 (p<.001)



	*Qualtrics Analyses
use "Qualtrics_Analyses_AppendixE&F.dta"
prtest race_correct==.25 // .94 (p<.001)

prtest gender_correct==.5 // .94 (p<.001)

prtest age_correct ==.20 // .63 (p<.001)

prtest edu_correct == .25 // .57 (p<.001)

prtest relig_correct ==.25 // .92 (p<.001)

prtest pid_correct ==.3333 // .52 (p<.001)


********************************************************
* APPENDIX F
*Perceived Importance of Targets' Attributes
********************************************************

use "Qualtrics_Analyses_AppendixE&F.dta"

mean Income_rating
estimates store income
mean Nature_rating
estimates store nature
mean Excess_rating
estimates store excess
mean Avarice_rating
estimates store avarice
mean Elitism_rating
estimates store elitism

*Figure F1
coefplot income nature excess avarice elitism, vertical bcolor(gs10%35)  ///
ytitle({bf:Perceived Importance}) ylabel(2(.2)3.2) ///
xscale(range(.2 5.75)) ///
xlabel(.65 "Income" 1.83 "Nature of Wealth" 3 "Excessive Consumption" 4.17 "Avarice" 5.37 "Elitism") /// 
xtitle({bf:Theoretical Categories}) barwidth(.5) /// 
recast(bar) ciopts(recast(rcap)) cismooth scheme(plotplain) legend(off) 



********************************************************
* APPENDIX G
*Exploring Interactions Between Target Traits
********************************************************
graph set  window fontface "ArialNarrow" 

*Interaction Between Donation Amount and Snobbery

	*MTurk Data
use "Kane_Newman_MTurk_replicationdata.dta"

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.donate_num2##i.report_num2 i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2, /// Elitism
cluster(respondent)

margins i.report_num2, at(donate_num2=(1(1)3))
*Top-left panel of Figure G1
marginsplot,  ///
title("Donations & Snobbery (MTurk)", span) ///
legend(pos(6) col(2)) ///
ytitle(pr(Increase Tax Rate on People Like Target)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) ///
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Donate_Snob_MTurk.gph", replace)


	*Qualtrics Data
use "Kane_Newman_Qualtrics_replicationdata.dta"

reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2##i.report_num2  i.goals_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2, /// Elitism
cluster(responseid)
margins i.report_num2, at(donate_num2=(1(1)3))
*Top-right panel of Figure G1
marginsplot,  ///
title("Donations & Snobbery (Qualtrics)", span) ///
legend(pos(6) col(2)) ///
ytitle(pr(Increase Tax Rate on People Like Target)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) /// 
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Donate_Snob_Qualtrics.gph", replace)


*Interaction Between Wanting to Be Rich and Snobbery

	*MTurk Data
use "Kane_Newman_MTurk_replicationdata.dta"

reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.donate_num2 i.goals_num2##i.report_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2, /// Elitism
cluster(respondent)

margins i.report_num2, at(goals_num2=(1(1)2))
*Bottom-left panel of Figure G1
marginsplot,  ///
title("Wants to Be Rich & Snobbery (MTurk)", span) ///
legend(pos(6) col(2) size(vsmall)) ///
ytitle(pr(Increase Tax Rate on People Like Target)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) /// 
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Goals_Snob_MTurk.gph", replace)


	*Qualtrics Data
use "Kane_Newman_Qualtrics_replicationdata.dta"
 
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.goals_num2##i.report_num2   /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2, /// Elitism
cluster(responseid)
margins i.report_num2, at(goals_num2=(1(1)2))
*Bottom-right panel of Figure G1
marginsplot,  ///
title("Wants to Be Rich & Snobbery (Qualtrics)", span) ///
legend(pos(6) col(2) size(vsmall)) ///
ytitle(pr(Increase Tax Rate on People Like Target)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) /// 
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Goals_Snob_Qualtrics.gph", replace)

*Combine all four panels into Figure G1
graph combine "Donate_Snob_MTurk.gph" "Donate_Snob_Qualtrics.gph" ///
"Goals_Snob_MTurk.gph" "Goals_Snob_Qualtrics.gph", ///
iscale(.7) scheme(538w) graphregion(color(white)) ///
xsize(6.5) ysize(8) col(2) play("Avarice_and_Snobbery_combined_fixes.grec")


*Interaction Between Wanting to Be Rich and Donation Amount

	*MTurk Data
use "Kane_Newman_MTurk_replicationdata.dta"
	
reg selected i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2  i.donate_num2##i.goals_num2    /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2, /// Elitism
cluster(respondent)

margins i.goals_num2, at(donate_num2=(1(1)3))
*Left panel of Figure G2
marginsplot,  ///
title("Donations & Wants to Be Rich (MTurk)", span) ///
legend(pos(6) col(2) size(vsmall)) ///
ytitle(pr(Increase Tax Rate on People Like Target), margin(medium)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) /// Left Right Top Bottom
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Goals_Donations_MTurk.gph", replace)


	*Qualtrics Data
use "Kane_Newman_Qualtrics_replicationdata.dta"
	
reg selected2 i.income_num2 i.occupation_num2 /// Resources
i.source_num2 i.family_num2  /// Nature of Wealth
i.real_num2 i.cars_num2  /// Excessive Consumption
i.tax2 i.donate_num2##i.goals_num2     /// Avarice
i.travel_num2 i.affiliations_num2 i.network_num2 i.report_num2, /// Elitism
cluster(responseid)

margins i.goals_num2, at(donate_num2=(1(1)3))
*Left panel of Figure G2
marginsplot,  ///
title("Donations & Wants to Be Rich (Qualtrics)", span) ///
legend(pos(6) col(2) size(vsmall)) ///
ytitle(pr(Increase Tax Rate on People Like Target)) ///
xtitle("") ///
plotopts(lwidth(medium) msize(medium) mlcolor(black) mlwidth(medium)) ///
ciopts(lwidth(medium)) ///
allxlabels xlabel(, labsize(vsmall) valuelabel) ///
graphregion(margin(1 8 0 0)) /// 
scheme(538w) ///
xsize(6.5) ysize(4.5) saving("Goals_Donations_Qualtrics.gph", replace)

*Combine two panels into Figure G2
graph combine "Goals_Donations_MTurk.gph" "Goals_Donations_Qualtrics.gph", ///
iscale(.8) scheme(538w) graphregion(color(white)) ///
xsize(6.5) ysize(4.5) col(2) 

**********************
**********************
